import request from '@/utils/request'

export const getRoleListApi = params => request.get('/sys/role', { params })
// 新增角色
export const addRoleApi = data => request.post('/sys/role', data)
// 编辑角色
export const editRoleApi = data => request.put(`/sys/role/${data.id}`, data)
// 删除角色
export const deleteRoleApi = id => request.delete(`/sys/role/${id}`)

// 获取权限点列表
export const getPermissionListApi = () => request.get('/sys/permission')

// 获取角色详情
export const getRoleInfoApi = id => request.get(`/sys/role/${id}`)

// 分配权限
export const assignPermissionApi = data => request.put('/sys/role/assignPrem', data)



